package com.example.order.repository;

import com.example.order.entity.OrderEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author : zhayh
 * @date : 2021-5-8 15:24
 * @description :
 */

@Repository
public interface OrderRepository extends JpaRepository<OrderEntity, Long> {
    // 根据订单号查询订单对象
    OrderEntity findByOrderCode(String orderCode);
    // 根据用户名查询已下单列表
    List<OrderEntity> findByOrderUserOrderByOrderConfirmTimeDesc(String user);
}
